public class Student {

    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

//    public static void main(String[] args) throws InterruptedException {
//        Student student = new Student();
//        Thread thread = new Thread(new MyRunnable(student));
//        thread.start();
//        // 获取子线程的返回值：让主线程等待1s
//        while (student.getName() == null){
//            Thread.sleep(1000);
//        }
//        System.out.println(student.getName());
//    }

}
